import fs from 'fs';
export default class Config {
	static getPort() {
		let port = 14000;
		return port;
	}
	static getRedis() {
		let isInDocker = fs.existsSync('/.dockerenv');
		let host = isInDocker ? 'redis' : 'localhost';
		return {
			host,
			port: 6379,
		};
	}
	static getRedisNohmPrefix() {
		let prefix = 'wxd';
		if (process.env.NODE_ENV == 'test') prefix += 'test';
		return prefix;
	}
}
